/**
 * jgamebox
 *
 * outlook@China software studio
 * Copyright (c) 2008-2011. All Rights Reserved.
 * http://www.outlook.com
 */

package org.outlook.comon.ai;

import java.util.Random;

/**
 * function:
 * @author watson  email: watson.wu@hotmail.com
 * @date 2011-5-30
 */
public class AIer {
	
	public final static Random RANDOM = new Random();

	public static int random() {
		return RANDOM.nextInt(100);
	}

	public static int random(int level) {
		return RANDOM.nextInt(level);
	}

	public static boolean isHit(int level) {
		return random()<level;
	}
	
	public static boolean get50Percents() {
		return random() < 50;
	}

}
